import {Component} from '@angular/core';
import {NavController, NavParams} from 'ionic-angular';
import {SystemService} from "../../service/SystemService";
import {Log} from "../../../framework/utils/Log";

/**
 * Generated class for the AboutUsPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */


@Component({
    selector: 'page-about-us',
    templateUrl: 'about-us.html',
    providers: [SystemService]
})
export class AboutUsPage {
    private static TAG: string = 'AboutUsPage';
    public context: any;

    constructor(public navCtrl: NavController, public navParams: NavParams, public sys: SystemService) {

    }

    ionViewDidLoad() {
        Log.w('Tag', 'AboutUsPage');
        this.sys.getAboutUs().subscribe((res: any) => {
            if (res.msgCode == '1') {
                this.context = res.content;
            } else {
                Log.printObj(AboutUsPage.TAG, '内容获取失败', res);
            }

        }, error => {
            Log.printObj(AboutUsPage.TAG, '内容获取失败', error);

        })
    }

}
